/***************************/
/*Bat dau chuc nang hien thi danh sach*/

function capnhat(ma)
{
	var MaSo = document.getElementById(ma + " ma").value;	
	var Ten = document.getElementById(ma + " ten").value;
	var DiaChi = document.getElementById(ma + " diachi").value;
	var DienThoai = document.getElementById(ma + " dienthoai").value;
	var NgaySinh = document.getElementById(ma + " ngaysinh").value;
	
	
	xmlhttp=GetXmlHttpObject();
	if (xmlhttp==null)
	{
		alert ("Browser does not support HTTP Request");
		return;
	}
	var url="components/sanpham/XLCapNhat/xlcapnhat.php?MaSo=" + MaSo + "&Ten=" + Ten + "&DiaChi=" + DiaChi + "&DienThoai=" + DienThoai  + "&NgaySinh=" + NgaySinh;
	xmlhttp.onreadystatechange=capnhat_stateChanged();
	xmlhttp.open("GET",url,true);
	xmlhttp.send(null);
}
	
function capnhat_stateChanged()
{
	if (xmlhttp.readyState==4)
	{
		var response_stat=xmlhttp.responseText;
			
        if(response_stat == 1)
		{
			alert('Cap nhat thanh cong.');
			hienthids();
		}
		else
		{
			alert('Cap nhat that bai');
		}
	}
}
/*Ket thuc chuc nang hien thi danh sach**/
/*****/